Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: paginating fetch multiple users request [WPB-4999] #2158

Merged
merged 4 commits into from
Oct 24, 2023

Conversation

saleniuk
Copy link
Contributor

@saleniuk saleniuk commented Oct 20, 2023


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

Currently when the app needs to fetch multiple users details, it makes a single request with all userIds. When the list contains around 4000 items, the API returns 413 Content Too Large.

Solutions

Make this request paginated.

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2023

Unit Test Results

       6 files         6 suites   7m 28s ⏱️
2 258 tests 2 240 ✔️ 18 💤 0

Results for commit 84b5678.

♻️ This comment has been updated with latest results.

@datadog-wireapp
Copy link

datadog-wireapp bot commented Oct 20, 2023

Datadog Report

All test runs 35655e0 🔗

2 Total Test Services: 0 Failed, 0 with New Flaky, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Wall Time Branch View
kalium-ios 0 0 0 2142 120 9m 9s Link
kalium-jvm 0 0 0 2259 98 14m 2s Link

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (release/candidate@2d2f00f). Click here to learn what that means.
The diff coverage is n/a.

@@                 Coverage Diff                  @@
##             release/candidate    #2158   +/-   ##
====================================================
  Coverage                     ?   58.16%           
  Complexity                   ?       21           
====================================================
  Files                        ?     1010           
  Lines                        ?    37721           
  Branches                     ?     3434           
====================================================
  Hits                         ?    21939           
  Misses                       ?    14312           
  Partials                     ?     1470           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d2f00f...b2a8c32. Read the comment docs.

@saleniuk saleniuk changed the title fix: paginating fetch multiple users request [WPB-4999] fix(RC): paginating fetch multiple users request [WPB-4999] Oct 20, 2023
@saleniuk saleniuk changed the title fix(RC): paginating fetch multiple users request [WPB-4999] fix: paginating fetch multiple users request [WPB-4999] Oct 20, 2023
@saleniuk saleniuk requested review from a team, gongracr, yamilmedina, mchenani and Garzas and removed request for a team October 24, 2023 07:11
Copy link
Member

@vitorhugods vitorhugods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Copy link
Contributor

@yamilmedina yamilmedina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIce usage of kollections goodies 🚀

@saleniuk saleniuk merged commit 51abd95 into release/candidate Oct 24, 2023
18 checks passed
@saleniuk saleniuk deleted the fix/paginating_fetch_users_rc branch October 24, 2023 10:12
github-actions bot pushed a commit that referenced this pull request Oct 24, 2023
* fix: paginating fetch multiple users request [WPB-4999]

* fix logs to print only sizes

* fix imports

* add tests
github-merge-queue bot pushed a commit that referenced this pull request Oct 26, 2023
* fix: paginating fetch multiple users request [WPB-4999]

* fix logs to print only sizes

* fix imports

* add tests

Co-authored-by: Michał Saleniuk <[email protected]>
Co-authored-by: Tommaso Piazza <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants